import request from "@/config/request.js";

const tagApi = {
  selectAll: "/tag/selectAll",
  selectByPage: "/tag/selectByPage",
  insert: "/tag/selectById",
  update: "/tag/update",
  detail: "/tag/detail",
  remove: "/tag/remove",
};


/**
 * 标签列表
 * @param {*} params
 * @returns
 */
export const selectAll = params => {
  return request.get(tagApi.selectAll, { params });
};

/**
 * 标签列表
 * @param {*} params
 * @returns
 */
export const selectByPage = params => {
  return request.get(tagApi.selectByPage, { params });
};

/**
 * 标签详情
 * @param {*} params
 * @returns
 */
export const detail = params => {
  return request.get(tagApi.detail, { params });
};

/**
 * 添加标签
 * @param {*} params
 * @returns
 */
export const insert = params => {
  return request.post(tagApi.insert, params);
};

/**
 * 更新标签
 * @param {*} params
 * @returns
 */
export const update = params => {
  return request.put(tagApi.update, params);
};

/**
 * 删除标签
 * @param {*} params
 * @returns
 */
export const remove = params => {
  return request.delete(tagApi.remove, params);
};
